//
//  UIButton+Extension.swift
//  weibo002
//
//  Created by 黑眼圈 on 16/4/16.
//  Copyright © 2016年 heiyan. All rights reserved.
//

import UIKit


extension UIButton{
    
    
    //按钮的遍历构造函数
    convenience init(title:String,imgName:String,titleColor:UIColor,font:CGFloat){
        
        self.init()
        
        self.setTitle(title, forState: .Normal)
        self.setTitleColor(titleColor, forState: .Normal)
        self.setBackgroundImage(UIImage(named: imgName), forState: .Normal)
        self.titleLabel?.font = UIFont.systemFontOfSize(font)
        
    }
    
    
    
    
    
}